<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: Decider80211MultiChannel Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00073.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Decider80211MultiChannel Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Decider80211MultiChannel" --><!-- doxytag: inherits="Decider80211Battery" -->
<p>Extends <a class="el" href="a00071.html" title="Decider for the 802.11 modules.">Decider80211</a> by multi channel support.  
 <a href="a00073.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00460_source.html">Decider80211MultiChannel.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Decider80211MultiChannel:</div>
<div class="dyncontent">
<div class="center"><img src="a00700.png" border="0" usemap="#Decider80211MultiChannel_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for Decider80211MultiChannel:</div>
<div class="dyncontent">
<div class="center"><img src="a00701.png" border="0" usemap="#Decider80211MultiChannel_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00702.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78bc41cd0231c95845f66bf8ea0ecad9"></a><!-- doxytag: member="Decider80211MultiChannel::Decider80211MultiChannel" ref="a78bc41cd0231c95845f66bf8ea0ecad9" args="(DeciderToPhyInterface *phy, double sensitivity, int myIndex, bool debug)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00073.html#a78bc41cd0231c95845f66bf8ea0ecad9">Decider80211MultiChannel</a> (<a class="el" href="a00079.html">DeciderToPhyInterface</a> *<a class="el" href="a00070.html#ac0f72556cb799d883b4219cab58320bb">phy</a>, double <a class="el" href="a00020.html#a5eece8bf532f92912ccbd0a3bc4d6fb0">sensitivity</a>, int <a class="el" href="a00020.html#a33e7f02028e78116193d09d6cdbc987e">myIndex</a>, bool <a class="el" href="a00020.html#aa22cd5156240713e37578172ba5557ce">debug</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Standard <a class="el" href="a00070.html" title="The basic Decider class.">Decider</a> constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00073.html#ab688642bf38bd6fe6e3a2cc82c48f4d6">channelChanged</a> (int newChannel)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by phy layer to indicate that the channel this radio currently listens to has changed.  <a href="#ab688642bf38bd6fe6e3a2cc82c48f4d6"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00075.html">DeciderResult</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00073.html#a43d8e040f2971e4793878b19ca614d0f">createResult</a> (const <a class="el" href="a00070.html#a8532046253d31801ffe4bc56b0d70850">airframe_ptr_t</a> frame) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the passed completed AirFrame was received correctly.  <a href="#a43d8e040f2971e4793878b19ca614d0f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Extends <a class="el" href="a00071.html" title="Decider for the 802.11 modules.">Decider80211</a> by multi channel support. </p>
<p>Filters processing of AirFrames depending on the channel they were sent on and the channel this deciders radio is currently set to. All AirFrames on another channel than the currently used one are ignored totally, they are neither received nor considered as interference. If the channel changed during the reception of an AirFrame the AirFrame is considered lost, independent from the size of the part which was lost due to channel change.</p>
<p>NOTE: This decider does not model interference between adjacent channels!</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Karl Wessel </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab688642bf38bd6fe6e3a2cc82c48f4d6"></a><!-- doxytag: member="Decider80211MultiChannel::channelChanged" ref="ab688642bf38bd6fe6e3a2cc82c48f4d6" args="(int newChannel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Decider80211MultiChannel::channelChanged </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newChannel</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Called by phy layer to indicate that the channel this radio currently listens to has changed. </p>
<p>Sub-classing deciders which support multiple channels should override this method to handle the effects of channel changes on ongoing receptions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newChannel</td><td>The new channel the radio has changed to. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="a00020.html#a1807c7256b577fe24cdd8e9c839f1d20">BaseDecider</a>.</p>

<p>References <a class="el" href="a00071.html#a15af6d061ab83d73474b6b94684707b6">Decider80211::centerFrequency</a>.</p>
<div class="fragment"><pre class="fragment">                                                            {
  assert(1 &lt;= newChannel &amp;&amp; newChannel &lt;= 14);
  <a class="code" href="a00071.html#a15af6d061ab83d73474b6b94684707b6" title="The center frequency on which the decider listens for signals.">centerFrequency</a> = CENTER_FREQUENCIES[newChannel];

  <a class="code" href="a00073.html#ab688642bf38bd6fe6e3a2cc82c48f4d6" title="Called by phy layer to indicate that the channel this radio currently listens to has changed...">Decider80211Battery::channelChanged</a>(newChannel);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a43d8e040f2971e4793878b19ca614d0f"></a><!-- doxytag: member="Decider80211MultiChannel::createResult" ref="a43d8e040f2971e4793878b19ca614d0f" args="(const airframe_ptr_t frame) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00075.html">DeciderResult</a> * Decider80211MultiChannel::createResult </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00070.html#a8532046253d31801ffe4bc56b0d70850">airframe_ptr_t</a>&#160;</td>
          <td class="paramname"><em>frame</em></td><td>)</td>
          <td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks if the passed completed AirFrame was received correctly. </p>
<p>Returns the result as a <a class="el" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>. If the channel changed during transmission the AirFrame is considered broken.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The result of the decider for the passed AirFrame. </dd></dl>

<p>Reimplemented from <a class="el" href="a00071.html#ae8d8435cae6ef92cc9bf8008e0bb56e4">Decider80211</a>.</p>

<p>References <a class="el" href="a00076.html#a514a242a3b67f14f7536b6d59e26a7ce">DeciderResult80211::getBitrate()</a>, <a class="el" href="a00079.html#a5c8df09fc0711587b07e2ac5d8412554">DeciderToPhyInterface::getCurrentRadioChannel()</a>, <a class="el" href="a00076.html#a2a5d1c65094164e0fad38927a14a4fb2">DeciderResult80211::getSnr()</a>, <a class="el" href="a00075.html#aa0ff5bc718c64668cb1ce09c2c7dba80">DeciderResult::isSignalCorrect()</a>, and <a class="el" href="a00070.html#ac0f72556cb799d883b4219cab58320bb">Decider::phy</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                      {
    <a class="code" href="a00076.html" title="Defines an extended DeciderResult for the 80211 protocol which stores the bit-rate of the transmissio...">DeciderResult80211</a>* result = <span class="keyword">static_cast&lt;</span><a class="code" href="a00076.html" title="Defines an extended DeciderResult for the 80211 protocol which stores the bit-rate of the transmissio...">DeciderResult80211</a>*<span class="keyword">&gt;</span>(<a class="code" href="a00073.html#a43d8e040f2971e4793878b19ca614d0f" title="Checks if the passed completed AirFrame was received correctly.">Decider80211Battery::createResult</a>(frame));

  <span class="keywordflow">if</span>(result-&gt;<a class="code" href="a00075.html#aa0ff5bc718c64668cb1ce09c2c7dba80" title="A Function that returns a very basic result about the Signal.">isSignalCorrect</a>() &amp;&amp; frame-&gt;getChannel() != <a class="code" href="a00070.html#ac0f72556cb799d883b4219cab58320bb" title="A pointer to the physical layer of this Decider.">phy</a>-&gt;<a class="code" href="a00079.html#a5c8df09fc0711587b07e2ac5d8412554" title="Returns the channel currently used by the radio.">getCurrentRadioChannel</a>()) {
    deciderEV &lt;&lt; <span class="stringliteral">&quot;Channel changed during reception. packet is lost!\n&quot;</span>;
    <a class="code" href="a00076.html" title="Defines an extended DeciderResult for the 80211 protocol which stores the bit-rate of the transmissio...">DeciderResult80211</a>* oldResult = result;

    result = <span class="keyword">new</span> <a class="code" href="a00076.html" title="Defines an extended DeciderResult for the 80211 protocol which stores the bit-rate of the transmissio...">DeciderResult80211</a>(<span class="keyword">false</span>, oldResult-&gt;<a class="code" href="a00076.html#a514a242a3b67f14f7536b6d59e26a7ce" title="Returns the bit-rate of the transmission of the packet.">getBitrate</a>(), oldResult-&gt;<a class="code" href="a00076.html#a2a5d1c65094164e0fad38927a14a4fb2" title="Returns the signal to noise ratio of the transmission.">getSnr</a>());
    <span class="keyword">delete</span> oldResult;
  }

  <span class="keywordflow">return</span> result;
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/phy/<a class="el" href="a00460_source.html">Decider80211MultiChannel.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/phy/Decider80211MultiChannel.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00073.html">Decider80211MultiChannel</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:31 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
